/* 选择页面头部 */
.selection-header {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.selection-header h1 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.selection-controls {
    display: flex;
    gap: 30px;
    align-items: center;
}

.date-selector,
.time-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-selector label,
.time-selector label {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.date-selector input,
.time-selector select {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}

/* 楼层选择器 */
.floor-selector {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.floor-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.floor-tab {
    padding: 8px 20px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
    white-space: nowrap;
    min-width: 60px;
}

.floor-tab:hover {
    background-color: #e6f7ff;
    color: #1890ff;
}

.floor-tab.active {
    background-color: #1890ff;
    color: #fff;
}

/* 座位地图 */
.seat-map {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.map-container {
    width: 100%;
}

/* 地图图例 */
.map-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.seat-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #d9d9d9;
}

.seat-icon.available {
    background-color: #52c41a;
    border-color: #52c41a;
}

.seat-icon.occupied {
    background-color: #ff4d4f;
    border-color: #ff4d4f;
}

.seat-icon.selected {
    background-color: #1890ff;
    border-color: #1890ff;
}

.seat-icon.disabled {
    background-color: #d9d9d9;
    border-color: #d9d9d9;
}

/* 座位网格 */
.seat-grid {
    width: 100%;
    overflow-x: auto;
}

/* 地图可视化 */
.map-visualization {
    position: relative;
    min-height: 500px;
    padding: 20px;
    background-color: #f0f2f5;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 区域样式 */
.map-area {
    margin-bottom: 20px;
}

.reception {
    width: 300px;
    height: 80px;
    background-color: #e6f7ff;
    border: 2px solid #91d5ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.area-label {
    font-weight: 500;
    color: #1890ff;
    font-size: 16px;
}

.bookshelf {
    background-color: #d9d9d9;
    border-radius: 4px;
    margin-bottom: 20px;
}

.bookshelf.horizontal {
    width: 600px;
    height: 15px;
}

.bookshelf.vertical {
    width: 15px;
    height: 150px;
    position: absolute;
    top: 150px;
    left: calc(50% - 200px);
}

.bookshelf.vertical:nth-child(4) {
    left: calc(50% + 185px);
}

/* 座位容器 */
.seats-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.seat-row {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 单个座位 */
.seat {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    position: relative;
    border: 2px solid transparent;
}

.seat.available {
    background-color: #52c41a;
    cursor: pointer;
}

.seat.available:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.seat.occupied {
    background-color: #ff4d4f;
    cursor: not-allowed;
}

.seat.selected {
    background-color: #1890ff;
    border-color: #096dd9;
    transform: scale(1.1);
}

.seat.disabled {
    background-color: #d9d9d9;
    cursor: not-allowed;
}

.seat::after {
    content: attr(data-seat);
    position: absolute;
    font-size: 10px;
    bottom: -2px;
}

/* 选中座位信息 */
.selected-seat-info {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.info-card h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}

#selected-seat-details {
    margin-bottom: 20px;
}

.no-seat-selected {
    text-align: center;
    color: #999;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.selected-seat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.selected-seat-item:last-child {
    border-bottom: none;
}

.selected-seat-label {
    color: #666;
}

.selected-seat-value {
    font-weight: 500;
    color: #333;
}

#confirm-booking {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .selection-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .date-selector,
    .time-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .map-legend {
        justify-content: center;
    }

    .bookshelf.horizontal {
        width: 90%;
    }

    .bookshelf.vertical {
        display: none;
    }

    .seat-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .seat {
        width: 35px;
        height: 35px;
    }

    .map-visualization {
        min-height: 400px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .selection-header {
        padding: 15px;
    }

    .selection-header h1 {
        font-size: 20px;
    }

    .floor-tabs {
        justify-content: center;
    }

    .seat-map {
        padding: 15px;
    }

    .seat {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }

    .map-visualization {
        min-height: 350px;
    }

    .reception {
        width: 90%;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.seat.selected {
    animation: pulse 1.5s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.map-visualization {
    animation: fadeIn 0.5s ease-in;
}

/* 座位状态变化动画 */
.seat {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 工具提示增强 */
.seat:hover::before {
    content: attr(data-seat) " (点击选择)";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
}

.seat.occupied:hover::before {
    content: attr(data-seat) " (已被预约)";
    background-color: #ff4d4f;
}

.seat.disabled:hover::before {
    content: attr(data-seat) " (不可用)";
    background-color: #999;
}